From 838391e420a0d2bf274e63a590791257ba655cbf Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 13 Aug 2015 22:31:28 +0200 Subject: [PATCH] Improve printer distinction for option retrieval In order to retrieve the user options for a printer, the respective printer name is used. This fixes the comparison of printer names to avoid that the options of another printer are accidently read whose name starts with the same letters, but is longer (e.g. "myprinterlongername" instead of "myprinter"). This fixes Bug 753628. --- modules/printbackends/cups/gtkprintbackendcups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 242ba3a09c..44868ddec5 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -3981,7 +3981,7 @@ cups_parse_user_options (const char *filename, *lineptr++ = '\0'; - if (strncasecmp (name, printer_name, strlen (printer_name)) != 0) + if (strcasecmp (name, printer_name) != 0) continue; /* We found our printer, parse the options */ -- 2.30.2